<?php

class Adept_Component_TextBox extends Adept_Component_ValueControl    
{

    protected $maxLength = null;
    protected $readOnly = null;
    protected $size = null;
    
    public function restoreState($state) 
    {
        
    }
    
    public function saveState() 
    {
        return array();
    }
    
    public function hasRenderer() 
    {
        return true;
    }    
    
    public function getMaxLength() 
    {
        if (!is_null($this->maxLength)) {
            return $this->maxLength;
        }
        return $this->getValueOfBinding('maxLength', null);
    }
    
    public function setMaxLength($maxLength) {
        $this->maxLength = $maxLength;
    }
    
    public function isReadOnly() 
    {
        if (!is_null($this->readOnly)) {
            return $this->readOnly;
        }
        return $this->getValueOfBinding('readOnly', false);
    }
    
    public function setReadOnly($readOnly) 
    {
        $this->readOnly = $readOnly;
    }
    
    public function getSize() 
    {
        if (!is_null($this->size)) {
            return $this->size;
        }
        return $this->getValueOfBinding('size', null);
    }
    
    public function setSize($size) 
    {
        $this->size = $size;
    }
    
}
